package com.leyou.common.exception;

import lombok.Getter;
import org.joda.time.DateTime;

/**
 * 响应异常结果类
 * @author xxx
 */
@Getter
public class ExceptionResult {
    /**
     * 响应的状态码
     */
    private Integer status;
    /**
     * 响应信息
     */
    private String message;
    /**
     * 时间
     */
    private String timestamp;

    public ExceptionResult(LyException e){
        this.status=e.getStatus();
        this.message=e.getMessage();
        this.timestamp= DateTime.now().toString("yyyy-MM-dd HH:mm:ss");
    }
}
